<template>
    <div class="loginview">
       <div class="black">
        今天玩完了明天再来哦
       </div>
    </div>
</template>
<script setup>
import api from '@/api/user'
import { ref } from 'vue'
import { useRouter } from 'vue-router';
import { message } from 'ant-design-vue';
import { useAuthStore } from '@/store/index.ts'
const store = useAuthStore();
const router = useRouter();
const username = ref("");
const password = ref("");
//点击登录
const login = () => {
    api.login({
        username:username.value,
        password:password.value
    })
    .then((res)=>{
        store.setroomid(null);
        store.setid(null);
        if(res.code==200){
            localStorage.setItem("token",res.token);
            router.push("/")
        }else{
            message.info(res.msg)
        }
    })
}
</script>
<style lang="scss" scoped>
.loginview {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('@/static/back.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    gap: 2rem;

   .black{
    background-color: #bea260;
    height: 60%;
    width: 60%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    border-radius: 10px;
    color: #fff;
   }
}
</style>